
#import <UIKit/UIKit.h>
#import "APPlaceHolderTextView.h"

@class ChatVoiceButton;


typedef NS_ENUM(NSInteger,chatVoicebuttonStatus) {
    DchatVoicebuttonStatusTimeShort,//时间过短
    DchatVoicebuttonStatusCancel,//上划取消
    DchatVoicebuttonStatusTimeBreak,//被打断
    DchatVoicebuttonStatusUpMove,//上滑
    DchatVoicebuttonStatusUpMoveCancel,
};

typedef NS_ENUM(NSInteger,chatMessageType) {
    DchatMessageTypeVoice,//声音
    DchatMessageTypeVideo,//视频
    DchatMessageTypePicture,//图片
};


@protocol ChatVoiceButtonDelegate <NSObject>

- (void)chatVoiceButtonPressed:(ChatVoiceButton *)voiceButton;
- (void)chatVoiceButtonUp:(ChatVoiceButton *)voiceButton;
- (void)chatVoiceButtonCancel:(ChatVoiceButton *)voiceButton touchStatus:(chatVoicebuttonStatus)status;

@end


@interface ChatVoicePowerView : UIImageView
@property (nonatomic, copy) NSString *message;
@end

@interface ChatVoiceButton : UIButton
@property (nonatomic, weak) id<ChatVoiceButtonDelegate>delegate;
@property (nonatomic, assign) chatVoicebuttonStatus touchStatus;
@property (nonatomic, assign) double seconds;

@end



@class APChatInputView;
@protocol ChatInputViewDelegate <NSObject>
@optional;
- (void)chatInputView:(APChatInputView *)inputView sendMessage:(NSString *)message;
- (void)chatInputView:(APChatInputView *)inputView sendMediaType:(chatMessageType)type filePath:(NSString *)filePath;
- (void)chatInputView:(APChatInputView *)inputView didselected:(NSIndexPath *)indexPath;

@end

@interface APChatInputView : UIView
@property (nonatomic, strong) APPlaceHolderTextView *textView;
@property (nonatomic, strong) UIView *naviView;
@property (nonatomic, assign) BOOL showMediaInput;
@property (nonatomic, strong) ChatVoiceButton *voiceButton;
@property (nonatomic, weak) id<ChatInputViewDelegate>delegate;
@end
